<?php
class Application_Form_Produit extends Zend_Form
{
	public function init()
	{
		
		$this->setName("Produit");
		
		$libelle = new Zend_Form_Element_Text("LibelleP");
		//$libelle->setLabel("Libelle : ");
		$libelle->setAttrib("class", "inp-form");
		
		$version = new Zend_Form_Element_Text("VersionP");
		//$version->setLabel("Version :");
		$version->setAttrib("class", "inp-form");
		
		$datePublication = new Zend_Form_Element_Text("PublicationP");
		//$datePublication->setLabel("Date de Publication :");
		$datePublication->setAttrib("class", "inp-form");
		
		$description = new Zend_Form_Element_Textarea("DescriptionP");
		//$description->setLabel("Description :");
		$description->setAttrib("class", "form-textarea");
		
		$responsable = new Zend_Form_Element_Select("ResponsableU");
		//$responsable->setLabel("Responsable : ")->setRequired(true);
		$responsable->setAttrib("class", "styledselect_form_1");
		$table = new Application_Model_DbTable_Utilisateur();
		
		foreach ( $table->GroupeResponsable() as $c)
		{
			$responsable->addMultiOption($c->id, $c->lname);
		}
		
		$addButton = new Zend_Form_Element_Submit("addButton");
		$addButton->setAttrib("class", "form-submit");
		//$addButton->setLabel("Ajouter");
		
		
		
		$annulerButton = new Zend_Form_Element_Button("annulerButton");
		$annulerButton->setAttrib("class", "form-reset");
		$annulerButton->setAttrib("onClick", "window.location='acceuil'");
		
		$this->addElements(array($libelle,$version,$datePublication,$description,$responsable,$addButton,$annulerButton));
	}
}
?>